import Vue from "vue";
import ElementUI from "element-ui";
import { assign } from "xe-utils";
import store from "@/store/index";
import ElFormReInitialValuePatch from "@/util/elFormreInitialValue.js";
assign(ElementUI.lang.zhCN.el.pagination, {
  goto: "跳至",
  pagesize: " 条/页",
  total: "共有{total}条",
});
ElementUI.locale(ElementUI.lang.zhCN);
ElementUI.Drawer.props.modalAppendToBody.default = false;
Vue.use(ElementUI, { size: store.state.settings.elementSize });
Vue.prototype.$ELEMENT = ElementUI;
Vue.prototype.$loading = ElementUI.Loading.service;
Vue.prototype.$msgbox = ElementUI.MessageBox;
Vue.prototype.$alert = ElementUI.MessageBox.alert;
Vue.prototype.$confirm = ElementUI.MessageBox.confirm;
Vue.prototype.$prompt = ElementUI.MessageBox.prompt;
Vue.prototype.$notify = ElementUI.Notification;
Vue.prototype.$message = ElementUI.Message;
// 修复el-form自定义resetValue值的问题
Vue.use(ElFormReInitialValuePatch);
Vue.config.productionTip = false;
